ostree-prepare-root: Use pivot_root if real sysroot is already mounted at /
authorWilliam Manley <will@williammanley.net>
Tue, 19 Jul 2016 18:48:23 +0000 (19:48 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 2 Aug 2016 19:07:25 +0000 (19:07 +0000)
commit485a374b2175a9a7dcb64889eb0acc10cb8bf3e4
treee33879ff9c6c2da6ce2d09dff7c2a21a42012abd
parent83c0fdc3520fb8e3494fe915b86d8125c53509ae
ostree-prepare-root: Use pivot_root if real sysroot is already mounted at /

This allows ostree-prepare-root outside of the initramfs context where the
real rootfs is already mounted at /.  We can't use `mount --move` in this
case because we would be trying to move / into a subdirectory of itself.

Closes: #403
Approved by: cgwalters
src/switchroot/ostree-prepare-root.c
tests/test-switchroot.sh